<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/static/css/base.css">
    <link rel="stylesheet" href="/static/css/index.css">
    <link rel="stylesheet" href="/static/vander/swiper/swiper-bundle.min.css">
</head>

<body>
    <div class="container header">
        首页
        <span>
            您好
            {{ if nickname }}
            <a href="/pages/self">{{ nickname }}</a>
            {{ else }}
            <a href="/pages/login">请登录</a>
            {{ /if }}
        </span>
    </div>

    <div class="nav container swiper">顶部导航</div>
    <div class=""><a href="/pages/list">商品列表</a></div>
    <p><a href="/pages/cart">去到购物车</a></p>

    <div class="banner swiper">
        <div class="swiper-wrapper">
            {{each list}}
            <div class="item swiper-slide" style="background-image:url(http://localhost:8080{{$value.img_url}}) ;">
                <a href="{{$value.link}}" style="width: 100%;height: 100%;display: block;"></a>
            </div>
            {{/each }}
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>

        <!-- 如果需要导航按钮 -->
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>


    </div>


    <script src="/static/vander/swiper/swiper-bundle.min.js"></script>
    <script src="/static/js/index.js"></script>
</body>

</html>